cmake_minimum_required(VERSION 3.10)
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_C_COMPILER gcc)
set(CMAKE_CXX_COMPILER g++)

find_package(OpenCV REQUIRED)
message(STATUS ${OpenCV_LIBRARY_DIRS})


include_directories(
    ${OpenCV_INCLUDE_DIRS}
    ${CMAKE_SOURCE_DIR}/include)


set(RTSP_SRCS RTSPServer/*.cpp
        include/rtsp_process.h)

add_executable(rtsp ${RTSP_SRCS})

set(link_libs pthread opencv_core opencv_highgui opencv_imgcodecs opencv_imgproc opencv_videoio
        rockchip_mpp rockchip_rga swscale avformat avcodec ${CMAKE_SOURCE_DIR}/3rdparty/librknn_api.so
        liveMedia groupsock BasicUsageEnvironment UsageEnvironment
)
target_link_libraries(rtsp ${OpenCV_LIBS} ${link_libs})
